home *** CD-ROM | disk | FTP | other *** search
- // ================
- // BATTLEZONE SHELL
- // ================
-
- //
- // CREATE SHELL LOGIN PAGE
- //
- CreateControl("ShellLogin", "WINDOW")
- {
- // inherit root window's dimensions
- Geometry("PARENTWIDTH", "PARENTHEIGHT");
-
- // set window style
- Style("TRANSPARENT");
-
- //
- // create the "exit" button
- //
- CreateControl("Exit", "BUTTON")
- {
- ColorGroup("MAGENTA");
-
- Geometry("LEFT", "TOP");
- Position(20, 30);
- Size(120, 0);
- BorderSize(10);
- BevelSize(5);
- TabSize(80, 10);
- Style("ROLLOVER", "OUTLINE");
- Projector(0);
- Title("Exit");
- TitleFont("MEDIUM");
- Cursor("Highlight");
- NotifyParent("Button::Press", "Exit");
- }
-
- //
- // create the login edit box
- //
- CreateControl("LoginEdit", "EDIT")
- {
- Geometry("HCENTRE", "TOP");
- Position(0, 130);
- Size(200, 20);
- Style("ROLLOVER", "OUTLINE");
- Projector(1);
- BorderSize(10);
- BevelSize(5);
- TabSize(120, 10);
- Title("Login Name");
- TitleFont("MEDIUM");
- Font("LARGE");
- UseVar("shell.login.name");
- Cursor("Highlight");
- NotifyParent("Edit::Enter", "Signup");
- }
-
- //
- // create the login list box
- //
- CreateControl("LoginList", "WINDOW")
- {
- Geometry("HCENTRE", "TOP");
- Position(0, 190);
- Size(200, 100);
- BorderSize(10);
- BevelSize(5);
- Style("OUTLINE");
- Projector(3);
- TabSize(120, 10);
- Title("Duty Roster");
- TitleFont("MEDIUM");
-
- CreateControl("List", "LISTBOX")
- {
- ColorGroup("LISTBOX");
-
- Geometry("HCENTRE", "TOP");
- Position(0, 0);
- Size(200, 100);
- CellSize(200, 10);
- BorderSize(5);
- BevelSize(3);
- Font("SMALL");
- UseVar("shell.login.name");
- Cursor("Highlight");
- }
- }
-
- //
- // create the "retire" button
- //
- CreateControl("Retire", "BUTTON")
- {
- Geometry("HCENTRE", "TOP");
- Position(0, 320);
- Size(200, 15);
- BorderSize(10);
- BevelSize(5);
- Style("ROLLOVER", "OUTLINE");
- Projector(5);
- Font("MEDIUM");
- JustifyText("CENTER");
- Text("Retire Pilot");
- Cursor("Highlight");
- NotifyParent("Button::Press", "Retire");
- }
-
- //
- // create the "enter" button
- //
- CreateControl("Enter", "BUTTON")
- {
- ColorGroup("MAGENTA");
-
- Geometry("RIGHT", "BOTTOM");
- Position(-20, -20);
- Size(120, 0);
- BorderSize(10);
- BevelSize(5);
- TabSize(80, 10);
- Style("ROLLOVER", "RIGHTTAB", "OUTLINE");
- Projector(4);
- Title("Enter");
- TitleFont("MEDIUM");
- Cursor("Highlight");
- NotifyParent("Button::Press", "Enter");
- }
-
- //
- // handle the "signup" event
- //
- OnEvent("SignUp")
- {
- Cmd("shell.login.signup");
- }
-
- //
- // handle the "retire" event
- //
- OnEvent("Retire")
- {
- Cmd("shell.login.retire");
- }
-
- //
- // handle the "enter" event
- //
- OnEvent("Enter")
- {
- Cmd("shell.login.enter");
- FadeOut();
- FadeIn("|ShellMain");
- }
-
- //
- // handle the "exit" event
- //
- OnEvent("Exit")
- {
- Cmd("sys.runcode quit");
- }
- }
-
-